<template>
  <div style="width: 100vw;">
    <div class="Cover">
      <div class="cover-bg">
        <div class="bg-inner">
          <div class="back-circle">
            <div class="circle-item"></div>
            <div class="circle-item"></div>
            <div class="circle-item"></div>
          </div>
        </div>
      </div>
      <div class="cover-content">
        <div class="people-title">清苑工作室</div>
        <div class="people-subtitle">OUR TEAM</div>
        <div class="slogan-en">Grow Together</div>
        <div class="slogan-zh">成长是一局团战</div>
        <div class="next-arrow"></div>
      </div>
    </div>
    <div class="Grow">
      <div class="grow-inner">
        <div class="Title">
          <div class="title-icon"></div>
          <div class="title">清苑成长</div>
          <div class="subtitle">Grow in QingYuan</div>
        </div>
        <div class="GrowCard" style="flex-direction: row-reverse;" v-for="(item,index) in infoData" :key="index">
          <div class="pic-part">
            <img alt="清苑成长" width="100%" :src="item.img">
          </div>
          <div class="content-part">
            <div class="card-title">{{item.title}}</div>
            <div class="card-content">{{item.conton}}</div>
          </div>
        </div>
      </div>
    </div>
    <div class="Members">
      <div class="members-inner">
        <div class="Title">
          <div class="title-icon"></div>
          <div class="title">清苑成员</div>
          <div class="subtitle">Members of QingYuan</div>
        </div>
        <ul class="MemberSelector">
          <li :id="'li'+item.id" v-for="(item,index) in memberList" @click="memberChang(item)">{{item.name}}</li>
        </ul>
        <div class="members-container">
          <div class="MemberCard" v-for="(item,index) in userist" :key="index">
            <div class="card-cover">
              <img :alt="item.name" :src="item.img">
            </div>
            <div class="card-content">
              <div class="card-name">{{item.name}}</div>
              <div class="card-description">{{item.dept}}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <Footer></Footer>
  </div>
</template>

<script  setup>
import { onMounted, defineEmits, onUnmounted, reactive, ref } from 'vue'
import Footer from '@/components/footer.vue';
const itemId = ref(0)
const infoData=reactive([
  {
    id:0,
    title:'青柚在日益成长',
    conton:'从一开始的几人团队到现在五十多人的工作室，青柚工作室吸引并欢迎越来越多志同道合的朋友们加入！我们和肖辰旭一起成长，一起进步，一起变得强大！',
    img:'https://statice.s3.cn-north-1.jdcloud-oss.com/img/join2.png?AWSAccessKeyId=JDC_F9E896E936B90397B57C9254FF52&Expires=1750912787&Signature=69ygpt18UrKtEePVcXfg6yLfKf0%3D'
  },
  {
    id:1,
    title:'做成长路上的得力队友',
    conton:'在这个团队里，大家讨论、交流、学习、进步、共事...在这里，你可以写你感兴趣的项目，为期末报告单设计UI，策划你喜欢的用户交流活动。平时再水水群、聊聊天，如果恰好赶上了秋招还能蹭上学长学姐们一顿又一顿的offer饭。 成长和进步是一局团战，要和得力的队友一起打！',
    img:'https://statice.s3.cn-north-1.jdcloud-oss.com/img/join2.png?AWSAccessKeyId=JDC_F9E896E936B90397B57C9254FF52&Expires=1750912787&Signature=69ygpt18UrKtEePVcXfg6yLfKf0%3D'
  },
  {
    id:2,
    title:'做成长路上的得力队友',
    conton:'在这个团队里',
    img:'https://statice.s3.cn-north-1.jdcloud-oss.com/img/join2.png?AWSAccessKeyId=JDC_F9E896E936B90397B57C9254FF52&Expires=1750912787&Signature=69ygpt18UrKtEePVcXfg6yLfKf0%3D'
  },
])
const memberList = reactive([
  {
    id:0,
    name:'指导老师',
  },
  {
    id:1,
    name:'负责人',
  },
  {
    id:2,
    name:'第一届',
  },
  {
    id:3,
    name:'第二届',
  },
  {
    id:4,
    name:'第三届',
  },
  {
    id:5,
    name:'第四届',
  },
  {
    id:6,
    name:'第五届',
  },
  {
    id:7,
    name:'第六届',
  },
  {
    id:8,
    name:'第七届',
  },
])
const userist = reactive([
  {
    id:0,
    name:'小黑',
    img:'https://wechat.static.qingyou.ren/qingyou-website/leaders/%E9%A1%BE%E4%BA%A6%E7%84%B6.jpeg',
    dept:'信息办'
  },
  {
    id:1,
    name:'小黑',
    img:'https://wechat.static.qingyou.ren/qingyou-website/leaders/%E9%A1%BE%E4%BA%A6%E7%84%B6.jpeg',
    dept:'信息办'
  },
  {
    id:1,
    name:'小黑',
    img:'https://wechat.static.qingyou.ren/qingyou-website/leaders/%E9%A1%BE%E4%BA%A6%E7%84%B6.jpeg',
    dept:'信息办'
  },

])
const emit = defineEmits(['top']);
function memberChang(data) {
  let oldli = document.getElementById('li'+itemId.value)
  oldli.className = ''
  let newli = document.getElementById('li'+data.id)
  newli.className = 'selected'
  itemId.value = data.id
}
const handleScrollColor = () => {
    emit("top",window.pageYOffset)
};
onMounted(()=>{
  let li = document.getElementById('li0')
  li.className = 'selected'
  itemId.value = 0
  window.addEventListener('scroll', handleScrollColor);
})
// 组件卸载前移除监听
onUnmounted(() => {
  removeEventListener('scroll', handleScrollColor);
  emit("top",0)
});
</script>

<style>
@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg) scale(1.8);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg) scale(1.8);
  }
}

@keyframes arrowRun {
  from {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(25px);
  }
  to {
    transform: translateY(0px);
  }
}
@media (max-width: 1200px) {
  .GrowCard {
    height: auto;
    .pic-part {
      width: 100%;
      height: auto;
      line-height: 0px;
      img {
        width: 100%;
      }
    }
    .content-part {
      width: 100%;
      padding: 30px 40px;
      height: auto;
    }
  }
}
</style>
<style scoped>
.Cover {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: rgba(169, 220, 91, 1);
  .cover-bg {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: absolute;
    .bg-inner {
      width: 100%;
      height: 100vh;
      background: linear-gradient(138.89deg, rgba(228, 255, 212, 0.2) 5.4%, rgba(65, 129, 64, 0) 39.42%), linear-gradient(116.39deg, rgba(255, 255, 255, 0.1) 9.12%, rgba(113, 113, 113, 0.072) 50.42%), linear-gradient(226.28deg, rgba(126, 147, 119, 0.5) -7.92%, rgba(90, 228, 42, 0) 47.54%, rgba(90, 228, 42, 0) 68.34%), radial-gradient(53.52% 76.97% at 17.6% 102.54%, rgba(239, 255, 54, 0.8) 0%, rgba(255, 255, 255, 0) 100%) /* warning: gradient uses a rotation that is not supported by CSS and may not behave as expected */, radial-gradient(86.13% 86.13% at 92.5% 13.87%, rgba(91, 253, 194, 0.5) 0%, rgba(255, 255, 255, 0) 100%) /* warning: gradient uses a rotation that is not supported by CSS and may not behave as expected */, radial-gradient(39.03% 77.18% at 89.03% 82.08%, #D3FF23 0%, rgba(212, 255, 39, 0) 100%) /* warning: gradient uses a rotation that is not supported by CSS and may not behave as expected */, #A9DC5B;
      position: absolute;
      filter: blur(10px);
      .back-circle {
        width: 1000px;
        height: 1000px;
        position: absolute;
        left: 50%;
        transform: translate(-50%, -50%) rotate(0deg) scale(1.8);
        top: 50%;
        animation: spin 20s linear infinite;
        filter: blur(70px);
        :nth-child(1) {
          background-color: rgba(117, 180, 255, 0.5);
          transform: translate(250px, 62.5px);
        }
        :nth-child(2) {
          background-color: rgba(91, 253, 194, 0.5);
          transform: translate(34px, 437.5px);
        }
        :nth-child(3) {
          background-color: rgba(255, 215, 75, 0.5);
          transform: translate(466px, 437.5px);
        }
        .circle-item {
          width: 500px;
          height: 500px;
          border-radius: 500px;
          position: absolute;
          flex: 1;
        }
      }
    }
  }
  .cover-content {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    flex-wrap: nowrap;
    color: white;
    text-align: center;
    white-space: nowrap;
    .people-title {
      height: 56px;
      line-height: 56px;
      font-size: 40px;
      font-weight: 500;
    }
    .people-subtitle {
      height: 42px;
      line-height: 42px;
      font-size: 30px;
      font-weight: 500;
      color: rgba(255, 255, 255, 0.5);
    }
    .slogan-en {
      width: 728px;
      height: 135px;
      line-height: 135px;
      font-size: 100px;
      font-weight: 700;
      transform: matrix(0.97, 0, -0.27, 1, 0, 0);
      margin-top: 45px;
      font-family: "Galano Grotesque Alt DEMO";
      text-align: justify;
      text-align-last: justify;
    }
    .slogan-zh {
      width: 728px;
      height: 81px;
      line-height: 81px;
      font-size: 60px;
      font-weight: 800;
      transform: matrix(0.97, 0, -0.27, 1, 0, 0);
      font-family: "HYYakuHei";
      text-align: justify;
      text-align-last: justify;
      margin-bottom: 160px;
    }
    .next-arrow {
      width: 70px;
      height: 70px;
      background-image: url("@/assets/media/Arrow.96b301fc97afc03a2991.svg");
      background-position: center;
      background-repeat: no-repeat;
      background-size: contain;
      position: absolute;
      bottom: 56px;
      animation: arrowRun 4s ease infinite;
    }
  }
}

.Grow{
  //height: 100vh;
  box-sizing: border-box;
  //padding-bottom: 120px;
  padding-top: 167px;
  width: 100%;
  .grow-inner{
    margin-left: 50%;
    max-width: 1280px;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 92%;
    .Title{
      align-content: flex-start;
      align-items: flex-start;
      color: #000;
      display: flex;
      flex-direction: column;
      flex-wrap: wrap;
      height: 60px;
      justify-content: flex-start;
      margin-bottom: 50px;
      width: 100%;

      .title-icon{
        background-image: url('@/assets/media/grow.6f07c64b07c305568e29c3283a75d815.svg');
        background-position: 50%;
        background-repeat: no-repeat;
        background-size: contain;
        height: 55px;
        margin-right: 20px;
        width: 55px;
      }
      .title{
        font-family: HYYakuHei;
        font-size: 32px;
        font-weight: 700;
        height: 32px;
        line-height: 32px;
      }
      .subtitle{
        font-size: 20px;
        font-weight: 400;
        height: 28px;
        line-height: 28px;
      }
    }

    .GrowCard:hover {
      background: #ffffff;
      box-shadow: 0px 38px 96px rgba(0, 0, 0, 0.1);
      .pic-part {
        img {
          transform: scale(1.062);
        }
      }
    }
    .GrowCard{
      width: 100%;
      height: 350px;
      background: rgba(255, 255, 255, 0.5);
      box-shadow: 0px 7px 15px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(8px);
      border-radius: 20px;
      overflow: hidden;
      display: flex;
      flex-wrap: nowrap;
      align-content: center;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 90px;
      transition: all 0.5s;

      .pic-part{
        width: 691px;
        height: 350px;
        line-height: 350px;
        text-align: center;
        overflow: hidden;
        img {
          width: 691px;
          transform: scale(1);
          transition: transform 0.5s;
          -webkit-user-drag: none;
        }
      }
      .content-part{
        width: calc(100% - 691px);
        height: 350px;
        padding: 50px 80px;
        font-size: 18px;
        .card-title{
          line-height: 35px;
          font-weight: 600;
          font-size: 25px;
          margin-bottom: 16px;
        }
        .card-content{
          font-weight: 400;
          font-size: 18px;
          line-height: 25px;
        }
      }
    }
  }
}

.Members{
  width: 100%;
  box-sizing: border-box;
  padding-top: 57px;
  padding-bottom: 100px;
  .members-inner{
    max-width: 1280px;
    width: 92%;
    margin-left: 50%;
    transform: translateX(-50%);
    .Title{
      align-content: flex-start;
      align-items: flex-start;
      color: #000;
      display: flex;
      flex-direction: column;
      flex-wrap: wrap;
      height: 60px;
      justify-content: flex-start;
      margin-bottom: 50px;
      width: 100%;
      .title-icon{
        background-position: 50%;
        background-repeat: no-repeat;
        background-size: contain;
        height: 55px;
        margin-right: 20px;
        width: 55px;
        background-image: url('@/assets/media/members.e67db58eac4b17e37fbef19a928f0bf6.svg');
      }
      .title{
        font-family: HYYakuHei;
        font-size: 32px;
        font-weight: 700;
        height: 32px;
        line-height: 32px;
      }
      .subtitle{
        font-size: 20px;
        font-weight: 400;
        height: 28px;
        line-height: 28px;
      }
    }
    .MemberSelector{
      list-style: none;
      margin: 50px 0;
      padding: 0;
      text-align: center;
      width: 100%;
      li{
        border-radius: 10px;
        color: #000;
        cursor: pointer;
        display: inline-block;
        font-family: Source Han Sans;
        font-size: 20px;
        font-weight: 500;
        height: 48px;
        line-height: 30px;
        line-height: 48px;
        list-style: none;
        margin: 0 10px;
        text-align: center;
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-user-select: none;
        user-select: none;
        width: 98px;
      }
      .selected {
        background: #47ae73;
        color: #fff;
      }
    }
    .members-container{
      width: 100%;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-content: flex-start;
      justify-content: flex-start;
      align-items: flex-start;
      .MemberCard{
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        background: hsla(0, 0%, 100%, .8);
        border-radius: 20px;
        display: inline-block;
        height: auto;
        margin-bottom: 30px;
        margin-left: 8px;
        margin-right: 8px;
        max-width: 304px;
        overflow: hidden;
        transition: all .5s ease;
        width: 65%;
        .card-cover{
          margin: 0;
          max-height: 204px;
          overflow: hidden;
          width: 100%;
          img {
            -webkit-user-drag: none;
            height: auto;
            -webkit-transform: scale(1) translateY(-30px);
            transform: scale(1) translateY(-30px);
            transition: all .5s ease;
            -webkit-user-select: none;
            user-select: none;
            width: 100%;
          }
        }
        .card-content{
          padding: 27px;
          .card-name{
            color: #000;
            font-size: 25px;
            font-weight: 600;
            line-height: 35px;
            margin-bottom: 7px;
          }
          .card-description{
            color: #4a4a4a;
            font-size: 18px;
            font-weight: 400;
            line-height: 25px;
          }
        }
      }

      .MemberCard:hover{
        background: #fff;
        box-shadow: 0 38px 96px rgba(0, 0, 0, .1);
        .card-cover{
          img {
            -webkit-transform: scale(1.05) translateY(-30px);
            transform: scale(1.05) translateY(-30px);
          }
        }
      }
    }
  }
}


</style>
